home *** CD-ROM | disk | FTP | other *** search
/ Star Festival... a Return to Japan / Star Festival... a Return to Japan.iso / pc / STARFESTIVAL / Shared.Cst / 00004.ls < prev    next >
Encoding:
Text File  |  1999-10-10  |  8.4 KB  |  285 lines

  1. on vidSwitch theSound
  2.   global gPlayBtnSprite
  3.   
  4.   global gMoviePlaying
  5.   
  6.   -- assign the sprite channel where the mouse click occured
  7.   set channel = the clickOn
  8.   
  9.   -- puppet video sprites, true
  10.   repeat with i = 10 to 13
  11.     puppetsprite i, true
  12.   end repeat
  13.   
  14.   -- check to see if passed argument
  15.   if theSound <> "none" then
  16.     -- make the sound channel a puppet, overriding any sound in the 
  17.     --  sound channel of the score and play the arg castmember sound
  18.     puppetSound theSound
  19.   end if
  20.   
  21.   set theCast = the name of cast( the castNum of sprite channel )
  22.   
  23.   -- casts are: Eng-english text; kanji-kanji text; kana-kana text
  24.   --  play-video play; voice-audio on; back-prrevious phrase; 
  25.   --  repeat-current phrase ; next-following phrase.
  26.   -- cast suffixes are: Down-unselected&pressed; SelDown-selected & pressed;
  27.   --  SelUp-selected & unpressed; Up-unselected&unpressed; 
  28.   
  29.   case theCast of
  30.       
  31.     "engUp":
  32.       -- show english text only with japanese audio
  33.       if not ( the castNum of sprite 13 = (the number of cast "voiceUp") ) then
  34.         set the castNum of sprite 13 to (the number of cast "voiceUp")
  35.         voicNih
  36.       end if
  37.       set the castNum of sprite 10 to (the number of cast "engDown")
  38.       updateStage
  39.       repeat while the stilldown
  40.       end repeat
  41.       set the castNum of sprite 10 to (the number of cast "engSelUp")
  42.       set the castNum of sprite 11 to (the number of cast "kanjiUp")
  43.       set the castNum of sprite 12 to (the number of cast "kanaUp")
  44.       textEng
  45.       updateStage
  46.       
  47.     "engSelUp":
  48.       set the castNum of sprite 10 to (the number of cast "engSelDown")
  49.       updateStage
  50.       repeat while the stilldown
  51.       end repeat
  52.       set the castNum of sprite 10 to (the number of cast "engUp")
  53.       set the castNum of sprite 11 to (the number of cast "kanjiUp")
  54.       set the castNum of sprite 12 to (the number of cast "kanaUp")
  55.       textNon
  56.       updateStage
  57.     "kanjiUp":
  58.       set the castNum of sprite 11 to (the number of cast "kanjiDown")
  59.       updateStage
  60.       repeat while the stilldown
  61.       end repeat
  62.       set the castNum of sprite 10 to (the number of cast "engUp")
  63.       set the castNum of sprite 11 to (the number of cast "kanjiSelUp")
  64.       set the castNum of sprite 12 to (the number of cast "kanaUp")
  65.       textKji
  66.       updateStage
  67.     "kanjiSelUp":
  68.       set the castNum of sprite 11 to (the number of cast "kanjiSelDown")
  69.       updateStage
  70.       repeat while the stilldown
  71.       end repeat
  72.       set the castNum of sprite 10 to (the number of cast "engUp")
  73.       set the castNum of sprite 11 to (the number of cast "kanjiUp")
  74.       set the castNum of sprite 12 to (the number of cast "kanaUp")
  75.       textNon
  76.       updateStage
  77.     "kanaUp":
  78.       set the castNum of sprite 12 to (the number of cast "kanaDown")
  79.       updateStage
  80.       repeat while the stilldown
  81.       end repeat
  82.       set the castNum of sprite 10 to (the number of cast "engUp")
  83.       set the castNum of sprite 11 to (the number of cast "kanjiUp")
  84.       set the castNum of sprite 12 to (the number of cast "kanaSelUp")
  85.       textKan
  86.       updateStage
  87.     "kanaSelUp":
  88.       set the castNum of sprite 12 to (the number of cast "kanaSelDown")
  89.       updateStage
  90.       repeat while the stilldown
  91.       end repeat
  92.       set the castNum of sprite 10 to (the number of cast "engUp")
  93.       set the castNum of sprite 11 to (the number of cast "kanjiUp")
  94.       set the castNum of sprite 12 to (the number of cast "kanaUp")
  95.       textNon
  96.       updateStage
  97.     "voiceUp":
  98.       -- turn off english text on english voiceover
  99.       if ( the castNum of sprite 10 = (the number of cast "engSelUp") ) then
  100.         textNon
  101.         updateStage
  102.         set the castNum of sprite 10 to (the number of cast "engUp")
  103.       end if
  104.       set the castNum of sprite 13 to (the number of cast "voiceDown")
  105.       updateStage
  106.       repeat while the stilldown
  107.       end repeat
  108.       set the castNum of sprite 13 to (the number of cast "voiceSelUp")
  109.       voicEng
  110.       updateStage
  111.     "voiceSelUp":
  112.       set the castNum of sprite 13 to (the number of cast "voiceSelDown")
  113.       updateStage
  114.       repeat while the stilldown
  115.       end repeat
  116.       set the castNum of sprite 13 to (the number of cast "voiceUp")
  117.       voicNih
  118.       updateStage
  119.     "playUp":
  120.       set the castNum of sprite gPlayBtnSprite to ¬¨
  121.         (the number of cast "playDown")
  122.       updateStage
  123.       repeat while the stilldown
  124.       end repeat
  125.       set the castNum of sprite gPlayBtnSprite to ¬¨
  126.         (the number of cast "playSelUp")
  127.       qtPlay
  128.       set gMoviePlaying = 1
  129.       updateStage
  130.     "playSelUp":
  131.       set the castNum of sprite gPlayBtnSprite to ¬¨
  132.         (the number of cast "playSelDown")
  133.       updateStage
  134.       repeat while the stilldown
  135.       end repeat
  136.       set the castNum of sprite gPlayBtnSprite to ¬¨
  137.         (the number of cast "playUp")
  138.       qtPause
  139.       set gMoviePlaying = 0
  140.       updateStage
  141.   end case 
  142.   
  143.   -- puppet video sprites, false
  144.   --  repeat with i = 10 to 13
  145.   --    puppetsprite i, false
  146.   --  end repeat
  147.   
  148. end vidSwitch
  149.  
  150. ------------------------------------------------------------------------
  151. on textEng
  152.   global DEBUG
  153.   global gPcVidSprite
  154.   
  155.   set DEBUG = 1
  156.   
  157.   if DEBUG then put "English Gl"
  158.   textNon
  159.   setTrackEnabled(sprite gPcVidSprite, 5, TRUE)
  160.   
  161.   set DEBUG = 0
  162.   
  163. end textEng
  164.  
  165. ------------------------------------------------------------------------
  166. on textNon
  167.   global DEBUG
  168.   global gPcVidSprite
  169.   
  170.   setTrackEnabled(sprite gPcVidSprite, 4, FALSE)
  171.   setTrackEnabled(sprite gPcVidSprite, 5, FALSE)
  172.   setTrackEnabled(sprite gPcVidSprite, 6, FALSE)
  173.   
  174. end textNon
  175.  
  176. ------------------------------------------------------------------------
  177. on textKji
  178.   global DEBUG
  179.   global gPcVidSprite
  180.   
  181.   if DEBUG then put "Japanese Gl"
  182.   textNon
  183.   setTrackEnabled(sprite gPcVidSprite, 4, TRUE)
  184.   
  185. end textKji
  186.  
  187. ------------------------------------------------------------------------
  188. on textKan
  189.   global DEBUG
  190.   global gPcVidSprite
  191.   
  192.   if DEBUG then put "Kana Gl"
  193.   textNon
  194.   setTrackEnabled(sprite gPcVidSprite, 6, TRUE)
  195.   
  196. end textKan
  197.  
  198. ------------------------------------------------------------------------
  199. on voicEng
  200.   global DEBUG
  201.   global gPcVidSprite
  202.   
  203.   if DEBUG then put "SelectAudioTrack 2"
  204.   setTrackEnabled(sprite gPcVidSprite, 2, FALSE)
  205.   setTrackEnabled(sprite gPcVidSprite, 3, TRUE)
  206.   
  207. end voicEng
  208.  
  209. ------------------------------------------------------------------------
  210. on voicNih 
  211.   global DEBUG
  212.   global gPcVidSprite
  213.   
  214.   if DEBUG then put "SelectAudioTrack 1"
  215.   setTrackEnabled(sprite gPcVidSprite, 3, FALSE)
  216.   setTrackEnabled(sprite gPcVidSprite, 2, TRUE)
  217.   
  218. end voicNih
  219.  
  220. ------------------------------------------------------------------------
  221. on FNswitch theSound
  222.   
  223.   global gPlayBtnSprite, gFNEngBtnSprite
  224.   
  225.   -- assign the sprite channel where the mouse click occured
  226.   set channel = the clickOn
  227.   
  228.   -- puppet video sprites, true
  229.   repeat with i = 10 to 13
  230.     puppetsprite i, true
  231.   end repeat
  232.   
  233.   -- check to see if passed argument
  234.   if theSound <> "none" then
  235.     -- make the sound channel a puppet, overriding any sound in the 
  236.     --  sound channel of the score and play the arg castmember sound
  237.     puppetSound theSound
  238.   end if
  239.   
  240.   set theCast = the name of cast( the castNum of sprite channel )
  241.   
  242.   case theCast of
  243.       
  244.     "engOffUp":
  245.       -- turn off english text on english voiceover
  246.       set the castNum of sprite gFNEngBtnSprite = (the number of cast "engOffDown")
  247.       updateStage
  248.       
  249.       repeat while the stilldown
  250.       end repeat
  251.       
  252.       set the castNum of sprite gFNEngBtnSprite to (the number of cast "engOnUp")
  253.       voicEng
  254.       updateStage
  255.       
  256.     "engOnUp":
  257.       set the castNum of sprite gFNEngBtnSprite to (the number of cast "engOnDown")
  258.       updateStage
  259.       repeat while the stilldown
  260.       end repeat
  261.       set the castNum of sprite gFNEngBtnSprite to (the number of cast "engOffUp")
  262.       voicNih
  263.       updateStage
  264.       
  265.     "FNplayUp":
  266.       set the castNum of sprite gPlayBtnSprite to (the number of cast "FNplayDown")
  267.       updateStage
  268.       repeat while the stilldown
  269.       end repeat
  270.       set the castNum of sprite gPlayBtnSprite to (the number of cast "FNpauseUp")
  271.       updateStage
  272.       
  273.     "FNpauseUp":
  274.       set the castNum of sprite gPlayBtnSprite to (the number of cast "FNpauseDown")
  275.       updateStage
  276.       repeat while the stilldown
  277.       end repeat
  278.       set the castNum of sprite gPlayBtnSprite to (the number of cast "FNplayUp")
  279.       updateStage
  280.       
  281.   end case 
  282.   
  283. end FNswitch
  284. ------------------------------------------------------------------------
  285.